/**************************************************************************************************
  Filename:       flash.h
  Revised:        $Date: 2018-10-8  $
  Revision:       $Revision: V1.0  $
  User:           $User:Asong      $
  Description:    flash

**************************************************************************************************/
#ifndef _NV_FLASH_H
#define _NV_FLASH_H


#ifdef __cplusplus
extern "C"
{
#endif
/*********************************************************************/

#include "Global.h"

#define NV_EEPROM_Wirte   0xFF
#define NV_EEPROM_Read    0x01


/***************256  257-1023***********/
#define APPSTARTUPOPTION_ADDR     0 //UPDATECFG_ADDR+255//UpdateCfgLen
#define COOLINGPARA_ADDR          1
#define CFGPARA_ADDR              2


uint8_t ReadStartupOptions( void );
extern void UserNV_EEPROMInit(uint32_t EEaddr, uint16_t len, uint8_t *buf, uint8_t setDefault );
extern void InitNV_EEpromTask(void );

extern void Flash_BufferWrite( uint8_t* pBuffer, uint8_t addrStart, uint8_t numByteToWrite );
extern void Flash_BufferRead(uint8_t* pBuffer, uint8_t ReadAddr, uint8_t NumByteToRead);

#ifdef __cplusplus
}
#endif

#endif




